<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <a href="javascript:void(0);">xxxx</a>
    <a href="#center">中间</a>
    <a href="#bottom">底部</a>

    <!-- 锚点 -->
    <a name="top"></a>

    <div
      style="height: 900px; border: 1px solid; background-color: green"
    ></div>
    <a name="center"></a>
    <div
      style="
        height: 900px;
        border: 1px solid;
        background-color: rgb(105, 7, 103);
      "
    ></div>
    <a name="bottom"></a>
    <a href="#top">顶部</a>
  </body>
</html>
